package Views;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import Models.Recipe;

import entries.BasicList;

public class RecipePanel extends JPanel{
				//used for the setEditable method in the EntryLists.
	public static final boolean EDIT = true; //EditMode
	public static final boolean READ = false; //read only mode
	
	BasicList basic;
	
	private boolean mode;
	
	/**
	 * Constructs a panel that contains the basics, malt, hops, adjuncts, and yeast panels
	 * @param mode
	 */
	public RecipePanel(boolean mode) {
		this.mode = mode;
		this.setLayout(new BorderLayout());
		this.basic = new BasicList(mode);
		this.add(this.basic, BorderLayout.NORTH);
	}
	
	public void setRecipe(Recipe rec) {
		this.basic.updateContents(rec);
	}
}
